import request from "@/service";

export const getContractsByCondition=(param)=>{
  return request({
    url:"contract/list",
    method:"get",
    params:param
  })
}

export const addContract=(param)=>{
  return request({
    url:"contract/add",
    method:"post",
    data:param
  })
}
export const editContract=(param)=>{
  return request({
    url:"contract/edit",
    method:"post",
    data:param
  })
}

export const changeContractActive=(param)=>{
  return request({
    url:"contract/changeContractActive",
    method:"post",
    data:param
  })
}

export const delContract=(param)=>{
  return request({
    url:"contract/delContract",
    method:"post",
    data:param
  })
}
export const getCancelContract=(param)=>{
  return request({
    url:"contract/getCancelContract",
    method:"get",
    params:param
  })
}
export const reStart=(param)=>{
  return request({
    url:"contract/reStart",
    method:"post",
    data:"contractName="+param
  })
}
